<admintpl file="header" />
</head>
<body class="J_scroll_fixed">
	<div class="wrap J_check_wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:U('Grade/index',array('sid'=>I('get.sid')))}">班级列表</a></li>
			<if condition="(I('session.school_id')||I('session.packet_id') lt 3) && I('session.packet_id') neq 5">
				<li><a href="{:U('Grade/add',array('sid'=>I('get.sid')))}">添加班级</a></li>
			</if>
		</ul>
		<form class="J_ajaxForm" action="" method="post">
		<table class="table table-hover table-bordered">
			<thead>
				<tr>
					<th width="30">ID</th>
					<th>班级名称 - 班主任</th>
					<th>球队简称</th>
					<th>入学年份</th>
					<th>球队简介</th>
					<th width="60">管理操作</th>
				</tr>
			</thead>
			<tbody>
				<foreach name="teaminfos" item="infos">
				<tr>
					<td>{$infos.id}</td>
					<td>
						<a href="{:U('Member/index',array('gid'=>$infos['id']))}">{$infos.team_name}
							<foreach name="users" item="user">
								<if condition="$infos['master_userid'] eq $user['id']"> - 
									{$user.user_nicename}
								</if>
							</foreach>
						</a>
					</td>
					<td>{$infos.short_name}
		        		<foreach name="ttype" item="type">
							<if condition="$infos['team_type'] eq $type['id'] && $infos['team_type'] gt 100">
								（{$type.name}）
							</if>
		               	</foreach>
					</td>
					<td>{$infos.description1}</td>
					<td>{$infos.description2}</td>
					<td>
						<a href='{:U("Grade/edit",array("id"=>$infos["id"],"sid"=>I("get.sid")))}'>修改</a>
						<if condition="1">
						|	<a class="J_ajax_del" href='{:U("Grade/delete",array("id"=>$infos["id"]))}'>删除</a>
						</if>
					</td>

				</tr>
				</foreach>
			</tbody>
		</table>
		<div class="pagination">{$page}</div>
		</form>
	</div>
</body>
</html>